package poi.Info;

import java.io.Serializable;

import poi.Surprise.SurpriseDaysOff;
import poi.Surprise.SurprisePrice;
import poi.Surprise.SurpriseSchedule;
import poi.Uncertainty.UncertaintyDaysOff;
import poi.Uncertainty.UncertaintyPrice;
import poi.Uncertainty.UncertaintySchedule;

/**
 * This class is used to store all the information about a POI and the Selective
 * Attention metrics (i.e., Surprise and Uncertainty values associated)
 * 
 * @author Hernani Costa
 * @version 0.2 date: 28/01/2013
 */

public class POIwithSAMetrics implements Serializable {
	private static final long serialVersionUID = 1L;
	POI poi;
	SurprisePrice sPrice;
	SurpriseDaysOff sDayOff;
	SurpriseSchedule sSchedule;
	UncertaintyPrice uPrice;
	UncertaintyDaysOff uDayOff;
	UncertaintySchedule uSchedule;

	/**
	 * ------------------------------------------------------------------------
	 * Constructor class
	 * ------------------------------------------------------------------------
	 * 
	 * @param poi
	 *            - POI
	 * @param sPrice
	 *            - the value of the Surprise's parameter Price
	 * @param sDayOff
	 *            - the value of the Surprise's parameter DayOff
	 * @param sSchedule
	 *            - the value of the Surprise's parameter Schedule
	 * @param uPrice
	 *            - the value of the Uncertainty's parameter Price
	 * @param uDayOff
	 *            - the value of the Uncertainty's parameter DayOff
	 * @param uSchedule
	 *            - the value of the Uncertainty's parameter Schedule
	 */
	public POIwithSAMetrics(POI poi, SurprisePrice sPrice,
			SurpriseDaysOff sDayOff, SurpriseSchedule sSchedule,
			UncertaintyPrice uPrice, UncertaintyDaysOff uDayOff,
			UncertaintySchedule uSchedule) {
		this.poi = poi;
		this.sPrice = sPrice;
		this.sDayOff = sDayOff;
		this.sSchedule = sSchedule;
		this.uPrice = uPrice;
		this.uDayOff = uDayOff;
		this.uSchedule = uSchedule;
	}

	// ------------------------------------------------------------------------
	// ------------------------GETs and SETs-----------------------------------
	// ------------------------------------------------------------------------

	public POI getPoi() {
		return poi;
	}

	public SurprisePrice getSurprisePrice() {
		return sPrice;
	}

	public SurpriseDaysOff getSurpriseDayOff() {
		return sDayOff;
	}

	public SurpriseSchedule getSurpriseSchedule() {
		return sSchedule;
	}

	public UncertaintyPrice getUncertaintyPrice() {
		return uPrice;
	}

	public UncertaintyDaysOff getUncertaintyDayOff() {
		return uDayOff;
	}

	public UncertaintySchedule getUncertaintySchedule() {
		return uSchedule;
	}

	/**
	 * ------------------------------------------------------------------------
	 * Returns a String with all the POI information (Selective Attention
	 * Values: Surprise and Uncertainty)
	 * ------------------------------------------------------------------------
	 */
	public String to_String() {
		String info = poi.to_String();
		if (sPrice != null)
			info += "\n\t" + sPrice.to_String();
		if (sDayOff != null)
			info += "\n\t" + sDayOff.to_String();
		if (sSchedule != null)
			info += "\n\t" + sSchedule.to_String();

		if (uPrice != null)
			info += "\n\t" + uPrice.to_String();
		if (uDayOff != null)
			info += "\n\t" + uDayOff.to_String();
		if (uSchedule != null)
			info += "\n\t" + uSchedule.to_String();
		return info;
	}

}
